package io.renren.modules.finance.service;



import io.renren.common.base.GenericService;
import io.renren.common.utils.ExcelData;
import io.renren.common.utils.PageUtils;
import io.renren.modules.finance.entity.FinanceMoneyRecord;

import java.math.BigDecimal;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * 收益账户变动明细表
 *
 * @author meishou
 * @date 2019-05-02 14:36:34
 */
public interface FinanceMoneyRecordService extends GenericService<FinanceMoneyRecord> {


    PageUtils queryAppPage(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 变动可提现余额，和订单无关
     *
     * @param agentId      代理ID
     * @param changeItem   变更项
     * @param briefing     说明
     * @param changeAmount 变更金额，正数增加，负数减少
     * @return
     */
    boolean saveRecord(Integer channelId, Long userId, Integer changeItem, String briefing, BigDecimal changeAmount, Integer type);


    ExcelData export(Map<String, Object> params);

    List<FinanceMoneyRecord> financeIncomeLogEntityList(Integer agentId);

    LinkedHashMap<String,Object> getIncomeDayStatistics();

    LinkedHashMap<String,Object> getIncomeWeekStatistics();

    LinkedHashMap<String,Object> getIncomeMonthStatistics();

    LinkedHashMap<String,Object> getIncomeYearStatistics();

    BigDecimal getYesterdayIncome();

    BigDecimal getBeforeWeekIncome();

    BigDecimal getBeforeMonthIncome();

    BigDecimal getBeforeYearIncome();

    List<FinanceMoneyRecord> testOutInAndOutTotal();
}

